# $Id: PKGBUILD 163617 2012-07-17 03:14:28Z eric $
# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Leif Warner <abimelech@gmail.com>

pkgname=python2-rdflib
pkgver=3.2.1
pkgrel=1
pkgdesc="A Python library for working with RDF, a simple yet powerful language for representing information"
url="http://rdflib.net/"
license=('BSD')
depends=('python2' 'python2-isodate')
makedepends=('python2-distribute')
checkdepends=('python2-nose')
arch=('any')
replaces=('rdflib')
provides=('rdflib')
conflicts=('rdflib')
source=(rdflib-$pkgver.tar.gz::https://github.com/RDFLib/rdflib/tarball/$pkgver)
sha1sums=('e49f7fa347bab177f4fa74b72730f8f088280b93')

check() {
  cd "$srcdir"/RDFLib-rdflib-*
  python2 setup.py test
}

package() {
  cd "$srcdir"/RDFLib-rdflib-*
  python2 setup.py install --root="$pkgdir" --optimize=1 
  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' "$pkgdir"/usr/lib/python2.7/site-packages/rdflib/plugins/parsers/{ntriples.py,notation3.py}
  install -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
